package com.stfalcon.chatkit.sample.holder.special;

import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.view.View;

import androidx.annotation.NonNull;

import com.stfalcon.chatkit.sample.features.demo.custom.holder.CustomHolderMessagesActivity;
import com.stfalcon.chatkit.sample.features.demo.styled.StyledDialogsActivity;
import com.stfalcon.chatkit.sample.holder.AbstractHolder;

import org.jetbrains.annotations.NotNull;

public class UserHolder extends AbstractHolder{

    public UserHolder(@NonNull @NotNull View itemView) {
        super(itemView);
    }
    /**
     * 初始化监听事件
     */
    protected void initListener()
    {
        this.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Context context = itemView.getContext();

                Intent intent = new Intent(context, CustomHolderMessagesActivity.class);

                Log.i("initListener",  getUserId());
                intent.putExtra("userId", getUserId());

                context.startActivity(intent);
            }
        });
    }
}
